package com.itheima;

//import com.itheima.entry.Account;
import com.itheima.entry.cunMoney;
import com.itheima.entry.quMoney;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface dao {
@Select("select Password from Account where accountID=#{accountID } ")
String findById(String accountID);

@Select("select Remaining from Account where accountID=#{accountID}")
int findMoney(String accountID);

//存钱
    @Update("UPDATE account SET Remaining = Remaining+#{money} WHERE AccountID=#{cunAccountID};")
    void cunMoney(cunMoney cunMoney);

    //取钱
    @Update("UPDATE account SET Remaining = Remaining-#{money} WHERE AccountID=#{quAccountID};")
    void quMoney(quMoney quMoney);

}
